<?php
/* @var $this PostController */
/* @var $model post */

$this->breadcrumbs=array(
	'Posts'=>array('index'),
	$model->title,
);

$this->menu=array(
	array('label'=>'List post', 'url'=>array('index')),
	array('label'=>'Create post', 'url'=>array('create')),
	array('label'=>'Update post', 'url'=>array('update', 'id'=>$model->id)),
	array('label'=>'Delete post', 'url'=>'#', 'linkOptions'=>array('submit'=>array('delete','id'=>$model->id),'confirm'=>'Are you sure you want to delete this item?')),
	array('label'=>'Manage post', 'url'=>array('admin')),
);
?>

<h1>View <?php echo $model->title; ?></h1>

<?php $this->widget('zii.widgets.CDetailView', array(
	'data'=>$model,
	'attributes'=>array(
		'id'=>'title',
		'author'=>'author',
		'title',
		'content',
		'tags',
		'status',
	),
)); ?>

<br>

<div id="comments">

    <h3>Leave a Comment</h3>
 
    <?php if(Yii::app()->user->hasFlash('commentSubmitted')): ?>
        <div class="flash-success">
            <?php echo Yii::app()->user->getFlash('commentSubmitted'); ?>
        </div>
    <?php else: ?>
        <?php $this->renderPartial('/comment/_form',array(
            'model'=>$comment,
        )); ?>
    <?php endif; ?>
 
</div>